package top.dotgo.kit.ex;

import lombok.Getter;

/**
 * @author : lin
 * @date : 2019/9/27 14:04
 * <p>
 * 统一异常处理
 */
@Getter
public class DotException extends RuntimeException {
    private final String msg;
    private final Integer code;

    public DotException(String msg) {
        this.msg = msg;
        this.code = DotMsg.ERROR_CODE;
    }

    public DotException(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }

    public DotException(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

}
